PATH
WebObjects 4.5 Documentation >
Tools and Techniques
Attributes
Every dynamic element has one or more
attributes.
These attributes are used for several purposes:
-
Some attributes are used to determine the exact HTML to be generated when the element is displayed.
For example, the value
attribute of a dynamic string element (WOString) determines what text is generated in its place. At run time, WebObjects replaces the WOString with the value of the variable or method that is bound to it.
-
Other attributes are used to capture information provided by users. In particular, form elements have attributes used for this purpose.
For example, when the user submits a form, text typed by the user into a dynamic text area (WOText) inside the form is assigned to the variable bound to the value
attribute of the text area.
-
Other attributes are used to specify actions to be taken when an event occurs.
For example, a dynamic hyperlink (WOHyperlink) has an action
attribute that specifies an action method
in the application that is executed when the user clicks the link.
The process of associating an attribute with a variable or method in your code is called binding
. WebObjects Builder provides tools to make it easy for you to create bindings. Information about your bindings is stored in the declarations (.wod
) file in your component.
Most dynamic elements have a number of attributes that you can bind. Some are required and others are optional. For complete information about WebObjects dynamic elements and their attributes, see Dynamic Elements Reference.
© 1999 Apple Computer, Inc. – (Last Updated July 27 99)